Skip to main content

How it works

SuperDialog ships a make_processor factory that builds a PipeCat FrameProcessor wrapping a DialogMachine. Because PipeCat’s FrameProcessor base class shifts between releases, SuperDialog synthesises the right subclass against whichever PipeCat version is installed.

Install

pip install superdialog pipecat-ai

Minimal example

from superdialog import DialogMachine, Flow
from superdialog.adapters.pipecat import make_processor

dialog_machine = DialogMachine(
    flow=Flow.load("kyc.json"),
    llm="openai/gpt-5.1",
)

processor = make_processor(dialog_machine)

Full pipeline

from pipecat.pipeline.pipeline import Pipeline
from pipecat.pipeline.runner import PipelineRunner
from pipecat.pipeline.task import PipelineTask
from pipecat.services.deepgram import DeepgramSTTService
from pipecat.services.cartesia import CartesiaTTSService
from superdialog import DialogMachine, Flow
from superdialog.adapters.pipecat import make_processor

async def main():
    dialog_machine = DialogMachine(
        flow=Flow.load("kyc.json"),
        llm="anthropic/claude-haiku-4-5",
    )

    pipeline = Pipeline([
        DeepgramSTTService(api_key="..."),   # STT
        make_processor(dialog_machine),       # SuperDialog as the LLM
        CartesiaTTSService(api_key="..."),    # TTS
    ])

    runner = PipelineRunner()
    task = PipelineTask(pipeline)
    await runner.run(task)

Per-call processor

For production, create a fresh DialogMachine and processor per call:
flow = Flow.load("kyc.json")   # load once, share by reference

async def handle_call():
    dm = DialogMachine(
        flow=flow,
        llm="anthropic/claude-haiku-4-5",
    )
    processor = make_processor(dm)

    pipeline = Pipeline([stt, processor, tts])
    await PipelineRunner().run(PipelineTask(pipeline))

When to use this adapter

  • You have an existing PipeCat-based voice stack
  • You want SuperDialog to replace hand-written LLM logic between STT and TTS
  • Your STT and TTS are already configured in PipeCat